//初始化图片功能
$(".img-picture").find("img").click(openPicture);
$(".img-picture").find("img").attr("data-toggle","modal");
$(".img-picture").find("img").attr("data-target","#modal-img");

//翻译员功能菜单切换
function moduleControl(ele,id){
    $(".module").attr("style","display: none")
    $(id).attr("style","");
    $(".nav li").attr("class","");
    $(ele).attr("class","active");
}

//发送客户邮件
function sendEmail() {
    var parent=$("#contact");
    var name=parent.find("input[name='name']").val();
    var email=parent.find("input[name='email']").val();
    var message=parent.find("textarea[name='message']").val();

    var json={name:name,email:email,message:message};


    $.ajaxSetup({async : false});
    $.get("/home/sendEmail",json,function (data) {
        if(data.code==1){
            alert("success");
            location.reload();
        }
    })
}